from pylab import *

T1 = []
T2 = []

for i in range(1,101):
	w = loadtxt('EoS/eos_'+str(i)+'.txt')
	n = sum( abs((w[:,0]+1)/w[:,1]) >= 2.0 )
	T1.append(n)

	n = 0
	for j in range(len(w[:,0])):
		if (w[j,0] > -1) and (w[j,4] > -1):
			n += 1

		if (w[j,0] < -1) and (w[j,5] < -1):
			n += 1

	print '%3d wi deviates from w=-1 more than 1-sigma!'%(n)
	T2.append(n)

T1 = array(T1)
T2 = array(T2)

print sum(T1>0)
print sum(T2>0)


# plot(T,'o')

# show()
